]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
keyboard: Hide keyboardBox after destroying the keyboard
authorJonas Dreßler <verdre@v0yd.nl>
Sat, 28 Mar 2020 13:36:20 +0000 (14:36 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Sat, 28 Mar 2020 20:45:32 +0000 (20:45 +0000)
It seems there is a weird race condition between Clutter trying to
destroy the keyboard actor and Clutter trying to hide the keyboardBox
container actor: If the keyboardBox is hidden before destroying the
keyboard actor, Clutter doesn't repaint anything and the keyboard
remains visible until something else draws over it.

To fix this issue until we find the underlying Clutter bug, simply
destroy the keyboard actor before hiding the keyboardBox. The order in
which we call these doesn't matter anyway since hideKeyboard(true) hides
the keyboard immediately without an animation.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/1736
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1142

js/ui/keyboard.js

index 2cac070db54e21a5a2785e0516f17c55ccf92e65..149bafd4208d1f672c6fef77833a08def25be7da 100644 (file)
@@ -1149,9 +1149,9 @@ var KeyboardManager = class KeyBoardManager {
             this._keyboard = new Keyboard();
         } else if (!enabled && this._keyboard) {
             this._keyboard.setCursorLocation(null);
-            Main.layoutManager.hideKeyboard(true);
             this._keyboard.destroy();
             this._keyboard = null;
+            Main.layoutManager.hideKeyboard(true);
         }
     }